<template>
	<view class="content">
		<view class="time">
			<u-notice-bar :text="text"></u-notice-bar>
		</view>
		<image mode="widthFix" :src="dataList.imageUrl"></image>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				dataList:{},
				text:''
			}
		},
		onLoad() {
			this.getListy()
		},
		methods: {
			getListy(){
				uni.request({
					url: 'https://api.2xb.cn/zaob',
					header: {
						'content-type': 'application/x-www-form-urlencoded' //自定义请求头信息
					},
					method: 'GET',

					//请求成功后返回
					success: (res) => {
						let text = '今天是：'
						this.dataList = res.data
						this.text = text + res.data.datatime
					}
				})
			},
			
		}
	}
</script>

<style scoped lang="scss">
.content{
	text-align: center;
}
</style>
